#pragma once

int WriteStringToFile(TCHAR* szFileName, CString cs)
{
    FILE *stream;

    if( (stream = _tfopen( szFileName, _T("a+") )) != NULL )
    {
        fwprintf(stream, _T("%s"), cs.GetBuffer());
        fclose( stream );
        cs.ReleaseBuffer();
        return 1;
    }
    cs.ReleaseBuffer();
    return 0;
}
